package com.qf.day06;

/**
 * 战士职业
 */
public class Warrior extends Hero {
    private int anger; //怒气值
    public int Heroicblows(int strength){  //英勇打击

       int s = super.NormalAttack(strength)*2;
        System.out.println("英勇打击的伤害为:"+s);
        this.anger=anger-20;
       return s;
    }


    //有参无参get set

    public Warrior() {
    }

    public Warrior(int anger) {
        this.anger = anger;
    }

    public Warrior(String name, int strength, int intellect, int agile, int anger) {
        super(name, strength, intellect, agile);
        this.anger = anger;
    }

    public int getAnger() {
        return anger;
    }

    public void setAnger(int anger) {
        this.anger = anger;
    }

    @Override
    public String toString() {
        return "Hero{" +
                "名字='" + super.getName() + '\'' +
                ", 力量=" + super.getStrength() +
                ", 智力=" + super.getIntellect() +
                ", 敏捷=" + super.getAgile() +
                ",怒气="+anger+
                '}';
    }

    @Override
    public int NormalAttack(int strength) {
        super.NormalAttack(strength);
        this.anger=anger+10;
        return strength;
    }
}
